package za.ac.lance.inheritance.subclass;

import za.ac.lance.inheritance.Animal;
import za.ac.lance.inheritance.superclass.Mammal;

/**
 * File Name: Cat.java
 * Version:
 * Description:
 * Package: za.ac.lance.inheritance.subclass
 * Author: Lance
 * Date: Feb 22, 2012
 */
public class Dog extends Mammal implements Animal
{

    private int barkFrequency;

    public Dog(int barkFrequency, String colour, int temperature)
    {
        super(colour, temperature);
        this.barkFrequency = barkFrequency;
    }

    public int getBarkFrequency()
    {
        return barkFrequency;
    }

    public void setBarkFrequency(int barkFrequency)
    {
        this.barkFrequency = barkFrequency;
    }

    @Override
    public void action()
    {for (int i = 0; i < barkFrequency; i++)
        {
            System.out.println("Dog Barking");
        }
    }
}
